import os

DEBUG = True

SERVER_PORT = 5000

APP_VERSION = '1.0.0'

AUTH_COOKIE_NAME = 'mooc_food'

PAGE_SIZE = 10
PAGE_DISPLAY = 10

SECRET_KEY = '\x7fKG\xf3\xb4\x0co\xef\x02\xbaw\xaf/|\xc8('

# 过滤url
IGNORE_URLS = [
    '^/user/login',
]

IGNORE_CHECK_LOGIN_URLS = [
    '^/static',
    '^/favicon.ico',
]

# API过滤url
API_IGNORE_URLS = {
    '^/api/member/checkreg/',
    '^/api/order/callback'
}

SQLALCHEMY_ECHO = False
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:781066@127.0.0.1/odmp_food'
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_ENCODING = 'utf-8'

# ueditor相关配置
UEDITOR_UPLOAD_PATH = os.getcwd() + '/web/static/images/foods/'
# UEDITOR_UPLOAD_TO_QINIU = False
# UEDITOR_QINIU_ACCESS_KEY = "a3KafHAOJy_WPOuoV8dqTT4VvMWuhq9QNAFzD7tx"
# UEDITOR_QINIU_SECRET_KEY = "W8lA713_lha9rt9mX4its0WWAPTWJWC4LiDcY8Yg"
# UEDITOR_QINIU_BUCKET_NAME = "jackie-cheng"
# UEDITOR_QINIU_DOMAIN = "http://qiniu.pygoo.cn/"

# 图片上传配置
UPLOAD = {
    'ext': ['jpg', 'gif', 'bmp', 'jpeg', 'png'],
    'prefix_path': '/web/static/upload/',
    'prefix_url': '/static/upload/'
}

# 服务器图片获取配置
APP = {
    'domain': 'http://192.168.1.228:5000'
}

# 支付状态值
PAY_STATUS_DISPLAY_MAPPING = {
    "0": "订单关闭",
    "1": "支付成功",
    "-8": "待支付",
    "-7": "待发货",
    "-6": "待确认",
    "-5": "待评价",

}

# 小程序相关配置
# 微信支付相关配置
MINA_APP = {
    'appid': 'wx1989c25393ceb396',
    'appsecret': 'b2ef23d08fe2d657ea670795f29ec371',
    'paykey': '',
    'mch_id': '',
    'callback_url': '/api/order/callback'
}